var mySwiper = new Swiper('.swiper-container', {

        //自动轮播
        autoplay: {
            delay: 3000
        },
        speed: 500,


        grabCursor: false,
        loop: true, // 循环模式选项

        // 如果需要分页器
        pagination: {
            el: '.swiper-pagination',
        },

        // 如果需要前进后退按钮
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },


        effect: 'fade',
        fade: {
            crossFade: false,
        },

        pagination: {
            el: '.swiper-pagination',
            clickable: true,
        }

    })
    //鼠标滑过pagination控制swiper切换
for (i = 0; i < mySwiper.pagination.bullets.length; i++) {
    mySwiper.pagination.bullets[i].onmouseover = function() {
        this.click();
    };
}

//鼠标覆盖停止自动切换
mySwiper.el.onmouseover = function() {
    mySwiper.autoplay.stop();
}

//鼠标离开开始自动切换
mySwiper.el.onmouseout = function() {
    mySwiper.autoplay.start();
}